import { get, post, put ,del} from "../utils/request";

//封装登录接口
export const loginAPI = (data) => post('/api/v1/auth/manager_login', data)

// 封装用户列表接口
export const nameAPI = (params) => get('/api/v1/admin/products', params)

// 添加用户接口
export const addAPI=(data)=>post('/api/v1/admin/products',data)

// 根据id修改
export const modyfyAPI = (id, data) =>
  put("/api/v1/admin/products/" + id, data);

// 根据id删除
export const delByIdAPI = (id) => del("/api/v1/admin/products/" + id);

//轮播图接口
export const carouselAPI=()=>get("https://gank.io/api/v2/banners")